using UnityEngine;

namespace Gameplay.PVE
{
    public class SelfMoveBehaviour : MoveBehaviour
    {
        protected override void UpdatePrepare()
        {
            if (PveGlobalVlues.SelfRunIntoBattle)
            {
                unit.Data.targetPosition = unit.Data.birthPosition;
                if (Vector3.Distance(unit.Data.birthPosition,unit.Data.position) <= unit.Data.configMoveSpeed * TimeManager.LogicDeltaTime)
                {
                    unit.Data.moveState = 0;
                }
                else
                {
                    unit.Data.moveState = 2;
                }
            }

            
        }
        
    }
}